import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

import base from "@/components/base.vue";
import b from "@/components/b.vue";
import c from "@/components/c.vue";

export default new Router({
    routes: [{
        path: "/login",
        name: "login",
        component: () =>
            import ("@/pages/login")
    }]
})

export const actionRouter = [{
    path: "/",
    redirect: "/base",
    component: () =>
        import ('@/pages/home.vue'),
    children: [{
            path: '/base',
            name: '公共页面',
            component: base,
        },
        {
            path: '/b',
            name: 'B专访页面',
            component: b,
            meta: {
                role: 'B'
            }
        },
        {
            path: '/c',
            name: 'C专访页面',
            component: c,
            meta: {
                role: 'C'
            }
        }
    ]
}]